import React, { Component } from 'react';
import RouterView from '../../router/router.view';
import './index.css';
import {NavLink} from 'react-router-dom';
import IsLogin from '../../utils/isLogin';

class Main extends Component {
    render() {
        return (
            <div className="wrap">
                <header>头部</header>
                <div className="con">
                    <RouterView routes={this.props.routes}></RouterView>
                </div>
                <footer>
                    <NavLink to='/main/home'>首页</NavLink>
                    <NavLink to='/main/classify'>分类</NavLink>
                    <NavLink to='/main/car'>购物车</NavLink>
                    <NavLink to='/main/my'>我的</NavLink>
                </footer>
            </div>
        );
    }
}

export default IsLogin(Main);